home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2010 Summer - Disc 1 / WN_Ete2010_CD1.iso / Onglet5 / Weezo / Weezo setup.exe / {code_appDir} / www / js / proxyScripts.js < prev    next >
Text File  |  2010-05-19  |  12KB  |  1 lines

  1. if(parent.updateURL){parent.updateURL()}var proxyJsAttr=new Array("ONCLICK","ONMOUSEOVER","ONMOUSEOUT","ONDBLCLICK","ONLOAD","ONRESIZE","ONABORT","ONBLUR","ONCHANGE","ONERROR","ONFOCUS","ONKEYDOWN","ONKEYPRESS","ONKEYUP","ONMOUSEDOWN","ONMOUSEUP","ONMOUSEMOVE","ONRESET","ONSELECT","ONSUBMIT","ONUNLOAD");var proxyLinkAttr=new Array("HREF","SRC","ACTION");String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"")};function proxyDgi(a){return document.getElementById(a)}var proxyDtable=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9",".","_");function proxyB64IC(b){r=-1;for(var a=0;a<proxyDtable.length;a++){if(b==proxyDtable[a]){r=a;break}}return r}function proxyB64F(a){while(a>256){a-=256}return a}function proxyB64Enc(e){var b=o2=o3=o4=0;var d="";proxyj=0;for(var a=0;a<e.length;a+=3){t=Math.min(3,e.length-a);if(t==1){x=e.charCodeAt(a);d+=proxyDtable[(x>>2)];d+=proxyDtable[((x&3)<<4)];d+="-";d+="-"}else{if(t==2){x=e.charCodeAt(a);y=e.charCodeAt(a+1);d+=proxyDtable[(x>>2)];d+=proxyDtable[((x&3)<<4)|(y>>4)];d+=proxyDtable[((y&15)<<2)];d+="-"}else{x=e.charCodeAt(a);y=e.charCodeAt(a+1);z=e.charCodeAt(a+2);d+=proxyDtable[x>>2];d+=proxyDtable[((x&3)<<4)|(y>>4)];d+=proxyDtable[((y&15)<<2)|(z>>6)];d+=proxyDtable[z&63]}}}return d}function proxyDecodeURL(e){if(e.indexOf("/proxyBrowser")==-1){return e}var g=e.substr(14+e.indexOf("/proxyBrowser"));g=g.substr(0,g.indexOf("/eourl/")).replace(/\//,"");var d;var b=o2=o3=0;var f="";proxyj=0;if((g.length%4)!=0){return null}for(var a=0;a<g.length;a+=4){x1=proxyB64IC(g.charAt(a));x2=proxyB64IC(g.charAt(a+1));x3=proxyB64IC(g.charAt(a+2));x4=proxyB64IC(g.charAt(a+3));ol=4;if(x4==-1){ol--;x4=0}if(x3==-1){ol--;x3=0}if(ol==4){b=((x1<<2)|(x2>>4));((b>256)?d=proxyB64F(b):d=b);f+=String.fromCharCode(d);o2=((x2<<4)|(x3>>2));((o2>256)?d=proxyB64F(o2):d=o2);f+=String.fromCharCode(d);o3=((x3<<6)|x4);((o3>256)?d=proxyB64F(o3):d=o3);f+=String.fromCharCode(d)}else{if(ol==3){b=((x1<<2)|(x2>>4));((b>256)?d=proxyB64F(b):d=b);f+=String.fromCharCode(d);o2=((x2<<4)|(x3>>2));((o2>256)?d=proxyB64F(o2):d=o2);f+=String.fromCharCode(d)}else{if(ol==2){b=((x1<<2)|(x2>>4));((b>256)?d=proxyB64F(b):d=b);f+=String.fromCharCode(d)}}}}return f}function proxyEncodeURL(b,f){if(!b||b.substr(0,baseURLProxy.length)==baseURLProxy){return b}if(b.substr(0,11).toLowerCase()=="javascript:"){return"javascript:"+proxyProcessJS(b.substr(11))}if(b.substr(0,2)=="//"){b=siteHref.protocol+":"+b}if(b.substr(0,7).toLowerCase()!="http://"&&b.substr(0,8).toLowerCase()!="https://"){if(f){b="http://"+b}else{if(proxyBaseHref&&b.substr(0,1)!="/"){b=proxyBaseHref+b}else{var h=siteHref.href;var a=((h.indexOf("/",9)>0)?h.substr(0,h.indexOf("/",9)):h);var e=((h.indexOf("?",9)>0)?h.substr(0,h.indexOf("?",9)):h);var g=((e.lastIndexOf("/")>8)?e.substr(0,e.lastIndexOf("/")):e);i=e.substr(0,g.length+1);if(b.substr(0,1)=="/"){b=a+b}else{b=g+"/"+b}}}}var i=((b.lastIndexOf("/")>8)?b.substr(b.lastIndexOf("/")+1):"");if(i.indexOf("?")>=0){i=i.substr(0,i.indexOf("?"))}var d="";b=proxyB64Enc(b);while(b.length>254){d+=b.substr(0,254)+"/";b=b.substr(254)}return baseURLProxy+d+b+"//eourl/a"+i}function sExp(b){var a="";var g="";var d=false;var f=0;var e="";while(f<b.length){c=b.charAt(f);if(!d){if(!a&&(c==","||c==";"||c=="\n"||c=="\r"||c==")"||c=="}"||c=="]")){break}else{if((c==")"&&g=="(")||(c=="}"&&g=="{")||(c=="]"&&g=="[")){a=a.substr(0,a.length-1);g=a.substr(a.length-1)}else{if(c=="("||c=="{"||c=="["){g=c;a+=c}else{if(c=="'"){d=1}else{if(c=='"'){d=2}else{if(c=="/"&&e=="/"){d=3}else{if(c=="*"&&e=="/"){d=4}}}}}}}}else{if(((d==1&&c=="'")||(d==2&&c=='"'))&&e!="\\"){d=0}else{if(d==3&&((c=="\n"||c=="\r")||(c=="/"&&e=="/"))){d=0}else{if(d==4&&c=="/"&&e=="*"){d=0}}}}e=c;f++}return(b.substr(0,f))}function sExpR(d,i){var a="";var h="";var e=false;var g=i;var f="";var b=";,{}\n\r+-=*!:?|&/><]([";while(g>0){c=d.charAt(g);f=d.charAt(g-1);if(!e){if(!a&&b.indexOf(c)!=-1){break}else{if((c=="("&&h==")")||(c=="{"&&h=="}")||(c=="["&&h=="]")){a=a.substr(0,a.length-1);h=a.substr(a.length-1)}else{if(c==")"||c=="}"||c=="]"){h=c;a+=c}else{if(c=="'"&&f!="\\"){e=1}else{if(c=='"'&&f!="\\"){e=2}}}}}}else{if(((e==1&&c=="'")||(e==2&&c=='"'))&&f!="\\"){e=0}}g--}return(d.substring(g+1,i))}function proxyProcessJS(a){if(!a){return a}a+="";a=a.replace(/eval\s*\(/g," proxyEval(");a=a.replace(/document\s*.\s*writeln\(/g,"proxyDocumentWriteln(");a=a.replace(/document\s*.\s*write\(/g,"proxyDocumentWrite(");a=a.replace(/window\s*.\s*open\s*\(/g,"proxyWindowOpen(");var b="";while((pos=a.search(/\.\s*((src)|(href)|(action))\s*\+=/))!=-1){pos2=a.indexOf("+",pos+4);pos3=a.indexOf("=",pos+4);s=sExpR(a,pos);expr=s+a.substring(pos,pos2);b=a.substr(0,pos-s.length)+expr+"="+expr+"+";a=a.substr(pos3+1)}a=b+a;var b="";while((pos=a.search(/\.\s*(((src)|(href)|(action))\s*[^=\s])/))!=-1){pos++;s=sExpR(a,pos);b+=a.substr(0,pos-s.length);while(a.charAt(pos)==" "||a.charAt(pos)=="\t"){pos++}if(a.charAt(pos)=="s"){pos+=3;s+="src"}else{if(a.charAt(pos)=="h"){pos+=4;s+="href"}else{pos+=6;s+="action"}}b+="proxyDecodeURL("+s+")";a=a.substr(pos)}a=b+a;b="";while((pos=a.search(/(\.\s*(src)|(href)|(action)\s*)=/))!=-1){pos=a.indexOf("=",pos);b+=a.substr(0,pos+1);a=a.substr(pos+1);s=sExp(a);b+="proxyEncodeURL("+s+")";a=a.substr(s.length)}a=b+a;b="";while((pos=a.search(/\.\s*innerHTML\s*=/))!=-1){pos=a.indexOf("=",pos);b+=a.substr(0,pos+1);a=a.substr(pos+1);s=sExp(a);b+="proxyJSProcessHTML("+s+")";a=a.substr(s.length)}a=b+a;return a}function proxyProcessCSS(a){processed="";while((pos=a.search(/url\s*\(/i))!=-1){pos=a.indexOf("(",pos);processed+=a.substr(0,pos+1);a=a.substr(pos+1);s=sExp(a);processed+=proxyEncodeURL(s)+")";a=a.substr(s.length)}a=processed+a;return a}function proxyProcessNode(b){var a;for(var d=0;d<proxyJsAttr.length;d++){if((a=b.getAttribute(proxyJsAttr[d]))!==null){a=a.toString();b.removeAttribute(proxyJsAttr[d]);b.setAttribute(proxyJsAttr[d].toUpperCase(),proxyProcessJS(a))}}for(d=0;d<proxyLinkAttr.length;d++){if((a=b.getAttribute(proxyLinkAttr[d]))!==null){b.removeAttribute(proxyLinkAttr[d]);if(a.toLowerCase().substr(0,11)=="javascript:"){b.setAttribute(proxyLinkAttr[d],"javascript:"+proxyProcessJS(a.substr(11)))}else{b.setAttribute(proxyLinkAttr[d].toUpperCase(),proxyEncodeURL(a))}}}if((a=b.getAttribute("STYLE"))!==null){a=a.toString();b.removeAttribute("STYLE");b.setAttribute("STYLE",proxyProcessCSS(a))}if(b.nodeName.toLowerCase()=="script"){b.nodeValue=proxyProcessJS(b.innerHTML)}for(d=0;d<b.childNodes.length;d++){if(b.childNodes[d].nodeType==1){proxyProcessNode(b.childNodes[d])}}}function proxyJSProcessHTML(a){a+="";if(!proxyDgi("proxyDWDOM")){document.write('<div id="proxyDWDOM" style="display:none"></div>')}if(!proxyDgi("proxyDWDOM")){var b=document.createElement("div");b.setAttribute("id","proxyDWDOM");b.setAttribute("style","display:none");try{document.lastChild.appendChild(b)}catch(d){alert("Proxy: cannot create proxyDWDOM node")}}proxyDgi("proxyDWDOM").innerHTML=a;proxyProcessNode(proxyDgi("proxyDWDOM"));a=proxyDgi("proxyDWDOM").innerHTML;proxyDgi("proxyDWDOM").innerHTML="";return a}function proxyDocumentWrite(a){document.write(proxyJSProcessHTML(a))}function proxyDocumentWriteln(a){document.writeln(proxyJSProcessHTML(a))}function proxyEval(script){try{eval(proxyProcessJS(script))}catch(err){}}function proxySetTimeout(a,b){setTimeout(proxyProcessJS(a),b)}function proxySetInterval(a,b){setInterval(proxyProcessJS(a),b)}function proxyWindowOpen(f,e,d){window.open(proxyEncodeURL(f),e,d)}function watchProxyDocumentLocation(){if(!proxyDgi("proxyDocumentLocationNode")){if(!document.body){return}var a=document.createElement("input");a.setAttribute("id","proxyDocumentLocationNode");a.setAttribute("style","display:none");document.body.appendChild(a)}var b=proxyDgi("proxyDocumentLocationNode").value+"";if(!b){return}if(b.substr(0,baseURLProxy.length)==baseURLProxy){document.location=b}else{document.location=proxyEncodeURL(b)}proxyDgi("proxyDocumentLocationNode").value=""}function proxyDocumentLocation(a){this.href=String(a);this.port="";this.protocol=a.substr(0,a.indexOf("://"));this.hash="";this.pathname="";this.search="";a=a.substr(a.indexOf("://")+3);if(a.indexOf(":")!=-1&&(a.indexOf("/")==-1||a.indexOf(":")<a.indexOf("/"))){this.host=a.substr(0,a.indexOf(":"));if((a.indexOf("/")==-1)){this.port=a.substr(a.indexOf(":")+1);a=""}else{this.port=a.substring(a.indexOf(":")+1,a.indexOf("/"));a=a.substr(a.indexOf("/"))}}else{if(a.indexOf("/")==-1){this.host=a;a=""}else{this.host=a.substr(0,a.indexOf("/"));a=a.substr(a.indexOf("/"))}}this.hostname=this.domain=this.host;if(a.indexOf("#")!=-1){this.hash=a.substr(a.indexOf("#"));a=a.substr(0,a.indexOf("#"))}if(a.indexOf("?")!=-1){this.search=a.substr(a.indexOf("?"));a=a.substr(0,a.indexOf("?"))}this.pathname=a}proxyDocumentLocation.prototype.toString=function(){return this.href};proxyDocumentLocation.prototype.reload=function(){document.location.reload()};proxyDocumentLocation.prototype.replace=function(a){document.location.replace(proxyEncodeURL(a))};proxyDocumentLocation.prototype.anchor=function(b){return this.href.anchor(b)};proxyDocumentLocation.prototype.big=function(){return this.href.big()};proxyDocumentLocation.prototype.blink=function(){return this.href.blink()};proxyDocumentLocation.prototype.bold=function(){return this.href.bold()};proxyDocumentLocation.prototype.charAt=function(b){return this.href.charAt(b)};proxyDocumentLocation.prototype.charCodeAt=function(b){return this.href.charCodeAt(b)};proxyDocumentLocation.prototype.concat=function(b){return this.href.concat(b)};proxyDocumentLocation.prototype.fixed=function(){return this.href.fixed()};proxyDocumentLocation.prototype.fontcolor=function(b){return this.href.fontcolor(b)};proxyDocumentLocation.prototype.fontsize=function(b){return this.href.fontsize(b)};proxyDocumentLocation.prototype.indexOf=function(e,d){return this.href.indexOf(e,d)};proxyDocumentLocation.prototype.italics=function(){return this.href.italics()};proxyDocumentLocation.prototype.lastIndexOf=function(e,d){return this.href.lastIndexOf(e,d)};proxyDocumentLocation.prototype.link=function(b){return this.href.link(b)};proxyDocumentLocation.prototype.match=function(b){return this.href.match(b)};proxyDocumentLocation.prototype.slice=function(e,d){return this.href.slice(e,d)};proxyDocumentLocation.prototype.small=function(){return this.href.small()};proxyDocumentLocation.prototype.split=function(e,d){return this.href.split(e,d)};proxyDocumentLocation.prototype.strike=function(){return this.href.strike()};proxyDocumentLocation.prototype.sub=function(){return this.href.sub()};proxyDocumentLocation.prototype.substr=function(e,d){return this.href.substr(e,d)};proxyDocumentLocation.prototype.substring=function(e,d){return this.href.substring(e,d)};proxyDocumentLocation.prototype.sup=function(){return this.href.sup()};proxyDocumentLocation.prototype.toLowerCase=function(){return this.href.toLowerCase()};proxyDocumentLocation.prototype.toUpperCase=function(){return this.href.toUpperCase()};var watchProxyDocumentLocationInt=window.setInterval("watchProxyDocumentLocation()",100);function proxyDocument(){this.location=siteHref}proxyDocument.prototype.write=function(b){proxyDocumentWrite(b)};proxyDocument.prototype.writeln=function(b){proxyDocumentWriteln(b)};function proxyClearCookie(){var b=document.cookie.split("; ");for(var a=0;a<b.length;a++){if(b[a].substr(0,12)=="proxyCookie"){document.cookie=b[a].substr(0,b[a].indexOf(":"))+"=0; expires="+proxyDateExpire}}}proxyClearCookie();function proxyGetCookie(a){return proxyCookies}function proxySetCookie(g){var a=0;if(g.indexOf(";")!=-1){var d=g.substr(g.indexOf(";")+1).trim();if(d.substr(0,8)=="expires="){a=d.substr(8).trim()}g=g.substr(0,g.indexOf(";"))}if(g.indexOf("=")==-1){return}var b=g.substr(0,g.indexOf("="));g=g.substr(g.indexOf("=")+1).trim();if(g.indexOf(";")!=-1){g=g.substr(0,g.indexOf(";"))}var f=proxyCookies.split("; ");proxyCookies="";for(var e=0;e<f.length;e++){if(f[e].substr(0,b.length+1)!=b+"="){proxyCookies+="; "+f[e]}}if(!a||new Date(a)>new Date){proxyCookies+="; "+b+"="+g}proxyCookies=proxyCookies.substr(1);document.cookie="proxyCookie"+b+"=expires/"+((a)?(Date.parse(a)/1000):"session")+"/"+g};